package ntd.util.modular.things.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import ntd.util.config.common.entity.BaseEntityMybatis;

import java.time.LocalDateTime;

/**
 * <p>
 * IOT-设备数据
 * </p>
 *
 * @author liuwenju
 * @since 2022-08-14
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("things_device_data_item")
@ApiModel(value = "DeviceData对象", description = "IOT-设备数据")
@NoArgsConstructor
public class DeviceDataItem extends BaseEntityMybatis<DeviceDataItem> {

    @ApiModelProperty("数据id")
    private String dataId;
    @ApiModelProperty("设备编码")
    private String deviceCode;
    @ApiModelProperty("因子编码")
    private String factorCode;
    @ApiModelProperty("因子名称")
    private String factorName;
    @ApiModelProperty("因子值")
    private String factorVal;
    @ApiModelProperty("因子标记")
    private String factorFlag;
    @ApiModelProperty("因子值-实时")
    private String factorValRtd;
    @ApiModelProperty("因子值-最小")
    private String factorValMin;
    @ApiModelProperty("因子值-最大")
    private String factorValMax;
    @ApiModelProperty("因子值-累计")
    private String factorValCou;
    @ApiModelProperty("因子值-实时-折算")
    private String factorValZsRtd;
    @ApiModelProperty("因子值-最小-折算")
    private String factorValZsMin;
    @ApiModelProperty("因子值-最大-折算")
    private String factorValZsMax;
    @ApiModelProperty("因子值-平均-折算")
    private String factorValZsAvg;
    @ApiModelProperty("因子标记-扩展")
    private String factorEflag;
    /** 因子单位 */
    private String factoryUnit;
    /** 因子单位 - 累计值 */
    private String factoryCouUnit;
    /** 数据时间 */
    private LocalDateTime dataTime;
    /** 富铭 - 因子故障编码 */
    private String factoryErr;

    public DeviceDataItem(String dataId, String deviceCode, String factorCode) {
        this.deviceCode = deviceCode;
        this.dataId = dataId;
        this.factorCode = factorCode;
    }
}
